package com.huike.web.controller.system;

import com.huike.clues.domain.SysDictData;
import com.huike.clues.service.ISysDictDataService;
import com.huike.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 白松
 */
@RestController
@Slf4j
@RequestMapping("/system/dict/data")
public class SysDictDataController {
    @Autowired
    private ISysDictDataService sysDictDataService;


@GetMapping("/type/{dictType}")
    public AjaxResult<List<SysDictData>> getData(@PathVariable String dictType){
     log.info("根据字典类型查询字典数据信息{}",dictType);
    return AjaxResult.success(sysDictDataService.getData(dictType));
}
}
